package com.dashen.sso.resource.controller;

import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.security.Principal;

/**
 * @author Barry Wang
 * @auther barry
 * @date 2019/1/20
 */
@RestController
@RequestMapping("/users/")
public class UserController {

    @GetMapping("me")
    public Principal user(Principal principal) {
        return principal;
    }
}
